package com.example.test.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 卖家等级
 *
 * @author wangyx
 */
@Getter
@AllArgsConstructor
public enum SellerLevelEnum {
    /**
     * SILVER：白银；GOLD：黄金；DIAMOND：钻石；
     */
    SILVER("白银") {
        @Override
        public SellerLevelEnum previous() {
            return SILVER;
        }

        @Override
        public SellerLevelEnum next() {
            return GOLD;
        }
    },
    GOLD("黄金") {
        @Override
        public SellerLevelEnum previous() {
            return SILVER;
        }

        @Override
        public SellerLevelEnum next() {
            return DIAMOND;
        }
    },
    DIAMOND("钻石") {
        @Override
        public SellerLevelEnum previous() {
            return GOLD;
        }

        @Override
        public SellerLevelEnum next() {
            return DIAMOND;
        }
    };
    /**
     * 描述
     */
    private final String description;

    /**
     * 前一个级别
     */
    public abstract SellerLevelEnum previous();

    /**
     * 后一个级别
     */
    public abstract SellerLevelEnum next();
}
